<?php
/**
 * Created by PhpStorm.
 * User: jungshen
 * Date: 2018/7/27
 * Time: 11:16
 */
use think\Db;

/**
 * 生成订单编号
 * @author jungshen
 * @return string
 */
function create_order_sn($len=16,$type='system'){
    /*$order_sn=date('ymdHis').createRandomStr(4,1);
    return $order_sn;*/
    $order_sn=null;
    while(!$order_sn){
        $order_sn=\service\DataService::createSequence($len,$type);
    }
    return $order_sn;
}

